package com.lagou.executor;

import com.lagou.pojo.Configuration;
import com.lagou.pojo.MappedStatement;

import java.util.List;

public interface Executor {

    <E> List<E> query(Configuration configuration, MappedStatement mappedStatement, Object[] params) throws Exception;

    /**
     * 执行 增删改 方法
     *
     * @param configuration
     * @param mappedStatement
     * @param param
     * @param <T>
     * @return 影响的数据数量
     * @throws Exception
     */
    <T> int update(Configuration configuration, MappedStatement mappedStatement, Object[] param) throws Exception;
}
